package java19_3_24_lambda.reflect;

/**
 * @author yuisama
 * @date 2022/03/24 19:01
 **/
public class Student extends Person{
    private String name;
    public int age;
    String country;

    public Student() {
        System.out.println("Non Parameter");
    }

    Student(String name) {
        System.out.println("One Parameter");
        this.name = name;
    }

    public Student(String name, int age, String country) {
        System.out.println("Three Parameters");
        this.name = name;
        this.age = age;
        this.country = country;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", country='" + country + '\'' +
                '}';
    }

    private void fun() {
        System.out.println("Student类的fun方法，private权限");
    }

    public int getAge(int num) {
        System.out.println("Student类的getAge方法，public权限");
        return this.age + num;
    }

    public static void staticFunc(String test) {
        System.out.println(test);
        System.out.println("Student类的静态方法");
    }
}